package com.gec.auction.service.impl;
//
import com.gec.auction.mapper.UserMapper;
import com.gec.auction.pojo.User;
import com.gec.auction.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

//import com.gec.auction.pojo.User;
//import com.gec.auction.pojo.UserExample;
//import com.gec.auction.service.UserService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//
//import java.util.List;
//
///**
// * @Author:gec
// * @Date:2022/4/9
// * @Description:code
// * @version:1.0
// */
@Service
public class UserServcieImpl implements UserService {

  @Autowired
    private UserMapper userMapper;

    @Override
    public User doLogin(String username, String userPassword) {
        User user = new User();
        user.setUsername(username);
        user.setUserpassword(userPassword);
        return userMapper.findUserByUserNameAndPassword(user);
    }

    @Override
    public void registerUser(User user) {
        userMapper.insert(user);
    }


}